import React from 'react'
import { useState,useEffect,useRef  } from 'react'
import "./index.less"
export default function SwitchOver() {
    const [secfront,setSecfront]= useState()
    // const [secback,setSecback]= useState<Element>(null)
    // let secfront = (null)
    // let secback = (null)
    /**
     * description:点击切换账套
     * params:空
     */
    useEffect(() => {
        let a:any = document.querySelector('.secfront')
        setSecfront(a)
    // secfront = document.querySelector('.secfront')
    // secback = document.querySelector('.secfront')
        }, [])
    const switchOver = () => {
    console.log(secfront,'--------------------->')
    }
    return (
        <div className="switchover">
            <header>
                <p>username</p>

            </header>
            <main>
                <section
                 className='secfront'
                 onClick={switchOver}
                 >
                    <p>账套切换</p>
                </section>
                <section
                 className='secback'
                 onClick={switchOver}>
                    <p>账套选择</p>
                </section>
            </main>
            <footer></footer>
        </div>
    )
}
